/**
 *
 */
package siebes.rmi.sorter;

import java.rmi.Naming;
import java.rmi.registry.LocateRegistry;

/**
 * Faciliteerd aan de serverkant de sorter.
 * Ook wordt de sortfactory gerigestreerd in de RMI registry.
 * @author eddie
 *
 */
public final class SortServer {

    /**
     * standaard poortnummer RMI.
     */
    private static final int PORTNR = 1100;
    /**
     * Geen public constructor nodig daarom private.
     */
    private SortServer() {
    }
    /**
     * @param args standaard voor main.
     */
    public static void main(final String[] args) {
        // TODO Auto-generated method stub
     // TODO Auto-generated method stub
        ISortFactory factory;
        try {
            LocateRegistry.createRegistry(PORTNR);
            factory = new SortFactory();
            Naming.rebind("//localhost:1100/factory", factory);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}
